<?php

namespace Addons\BusinessCard\Controller;

use Home\Controller\AddonsController;

class BusinessCardController extends AddonsController
{
    function lists()
    {
        $this->assign('add_button', false);

        $model = $this->getModel('BusinessCard');

        $list_data = $this->_get_model_list($model);
        foreach ($list_data ['list_data'] as &$vo) {
            // $url = U ( 'detail?uid=' . $vo ['uid'] );

            $url = addons_url('BusinessCard://Wap/detail', array(
                'uid' => $vo ['uid']
            ));
            $vo ['qrcode'] = "<img class='list_img' src='http://qr.liantu.com/api.php?text=$url' />";
        }
        $this->assign($list_data);

        $this->display();
    }
}
